Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 1, 2026

Summary

  • Add --void-type option to infer command to control how void types are rendered in TypeScript (undefined vs null)
  • Make --lang optional for infer - type generation now works with unlinked queries
  • Fix emission of entrypoints with primitive result types (like VOID)

Changes

TypeScript codegen (typegen/typescript.rs):

  • Add VoidType enum (Undefined | Null)
  • Add void_type field to Config
  • Fix collect_reachable_types to properly emit entrypoints with primitive result types

CLI (plotnik-cli):

  • Add --void-type <TYPE> argument (accepts null, defaults to undefined)
  • Make --lang optional - infer now works without a language by emitting from unlinked queries

Test plan

  • make clippy passes
  • make test passes

@zharinov zharinov enabled auto-merge (squash) January 1, 2026 19:36
@zharinov zharinov merged commit 85f7b92 into master Jan 1, 2026
4 checks passed
@zharinov zharinov deleted the feat/infer-improvements branch January 1, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants